﻿@using Web.Model;
@using Web.HelperClasses.AvatarService

@helper Small(User user, string imageClass, string id = null)
{
    string url = user != null && user.Avatar != null && user.Avatar.Small != null ? user.Avatar.Small.OriginalSizeUrl : UserAvatarService.NoAvatarSmall;
	string alt = user != null ? user.DisplayName : "";
    <img src="@url" alt="@alt" class="@imageClass" @(id != null ? "id=\"" + id + "\"" : "")/>
}

@helper Medium(User user, string imageClass, string id = null)
{
    string url = user != null && user.Avatar != null && user.Avatar.Medium != null ? user.Avatar.Medium.OriginalSizeUrl : UserAvatarService.NoAvatarMedium;
	string alt = user != null ? user.DisplayName : "";
    <img src="@url" alt="@alt" class="@imageClass" @(id != null ? "id=\"" + id + "\"" : "")/>
} 

@helper Large(User user, string imageClass, string id = null)
{
    string url = user != null && user.Avatar != null && user.Avatar.Large != null ? user.Avatar.Large.OriginalSizeUrl : UserAvatarService.NoAvatarLarge;
	string alt = user != null ? user.DisplayName : "";
    <img src="@url" alt="@alt" class="@imageClass" @(id != null ? "id=\"" + id + "\"" : "")/>
} 